<?php

namespace App\Transformers;

use League\Fractal\TransformerAbstract;

class BaseTransformer extends TransformerAbstract
{
    protected $select, $data1 = [];

    public function __construct($select = [])
    {
        $this->select = $select;
    }

    public function _select($data)
    {
        if ($this->select) {
            $data = array_only($data, $this->select);
        }

        return $data;
    }
}
